let prom_types = [
    {"name": "单一促销","type": 1,code: "sigle_promotion"},
    {"name": "满额促销","type": 3,code: "mane_promotion"},
    {"name": "秒杀","type": 4,code: "skill_promotion"},
    {"name": "满量促销","type": 2,code: "sigle_promotion"},
    {"name": "赠送类促销","type": 5,code: "gift_promotion"},
    {"name": "组合促销","type": 6,code: "complex_promotion"},
    {"name": "单品X件优惠","type": 7,code: "sigle_promotion_1"},
    {"name": "换购","type": 8,code: "increase_promotion"},
    {"name": "预售","type": 9,code: "presell_promotion"},
  ]



function promTypeConverter (type) {
    let name = '';
   prom_types.map(function(value,index,array){
        if(value.type == type){
            name = value.name;
        }
    });
    return name;
}

module.exports = {
    prom_types,
    promTypeConverter,

}
